<template>
	
		<!-- <view>点我</view> -->
		
						<view class="index container">
							<!-- 商品内容 -->
							<!-- <detriment :detriment="detriment"></detriment> -->
							<view class="detriment display-flex justify-between flex-wrap width-100 flex-row">
								<view class="productItem display-flex  width-100" v-for="(item,index) in orderlist"  >
								
									<div class="left">
										<image :src="item.imgUrl"></image>
									</div>
									<!-- 右侧商品介绍 -->
									<div class="message ">
										<!-- 商品名称 -->
										<view class="bigTitle font-bold font-max">
											{{item.title}}
										</view>
										<!-- 商品价格 -->
							<view class="price display-flex align-end">
							<view class="current display-flex text-primary-color font-maxx" >
								<view class="text-primary-color font-mini">
									￥{{item.sellPrice}}
								</view>
								
							</view>
							
						</view>
						<view v-if="item.flag==1">
							订单已完成
						</view>
						<view v-else="item.flag==0">
							订单已取消
						</view>
										
					      </div>
									
						</view>
							
				</view>
						</view>
					
	
	
	
	
</template>

<script>
	export default { 
		data() {
			return {
				// 购物车数据
				orderlist:[],
				uid:'',
			}
		},
		
		methods:{
			async getOrder(){
				const res = await this.$myRequest({
							url: '/getAllOrder?uid='+this.uid
							})
							console.log(res)
							this.orderlist=res.data
							console.log(this.orderlist)					
			},

		},
		onShow() {
			this.getOrder()
			
		},
		onLoad(option) {
			this.uid=option.uid
		}
	}
</script>

<style>
/* 整体内容 */
.index{
	margin-top:0upx;
	/* padding-top: -300upx; */
	width:100%;
}
/* 内容 */
.detriment{
	margin-bottom:20upx;
	box-sizing: border-box;
	position: relative;
}
/* 图片 */
.left{
	margin-left:50upx;
	display: inline-block;

}
.left image{
	width: 250upx;
	height: 250upx;
	margin: 0 auto;
	
}
/* 右侧介绍 */
.message{
	display: inline-block;
	/* padding-bottom: -100upx; */
	margin-left: 40upx;
	position: absolute;
	/* margin-top: -20upx; */
	float: left;
	
}

.text-primary-color{
	color: #f06c7a;
}



</style>
